//作者diaoyu
function verifyLogin(url) {
    let cnt = 0;
    let cookie = '';
    let r = Math.random();
    let yzm_url = getHome(url) + '/index.php/verify/index.html';
    log(`验证码链接:${yzm_url}`);
    let submit_url = getHome(url) + '/index.php/ajax/verify_check';
    log(`post登录链接:${submit_url}`);
    while (cnt < OCR_RETRY) {
        try {
            let {cookie, html} = reqCookie(yzm_url + '?r=' + r, {toBase64: true});
            let code = OcrApi.classification(html);
            log(`第${cnt + 1}次验证码识别结果:${code}`);
            html = post(submit_url, {
                headers: {Cookie: cookie},
                body: 'type=search&verify=' + code,
            });
            html = JSON.parse(html);
            
            if (html.code === 1) {
                log(`第${cnt + 1}次验证码提交成功`);
                log(cookie);
                return cookie // 需要返回cookie
            } else if (html.code !== 1 && cnt + 1 >= OCR_RETRY) {
                cookie = ''; // 需要清空返回cookie
            }
        } catch (e) {
            log(`第${cnt + 1}次验证码提交失败:${e.message}`);
            if (cnt + 1 >= OCR_RETRY) {
                cookie = '';
            }
        }
        cnt += 1
    }
    return cookie
}
var rule = {
    title: 'A8影视',
    host: 'https://www.a8ys.vip',
    url: '/vodtypehtml/fyclass/',
    searchUrl: '/vodsearch/**----------fypage---.html',
    searchable: 2,//是否启用全局搜索,
    quickSearch: 0,//是否启用快速搜索,
    filterable: 0,//是否启用分类筛选,
    headers: {
                'User-Agent':'MOBILE_UA', 
                //'Referer': '/'
                // "Cookie":"searchneed=ok"
            },
    编码: 'utf-8',
    timeout: 5000,
    class_name:'电影&电视剧&综艺&动漫&纪录&解说&短剧',
  class_url:'1&2&3&4&5&530&535',
  tab_exclude: '追剧周表|今日更新|口碑推荐|热搜榜|APP',
    play_parse: true,
     lazy: $js.toString(() => {
        input = {parse: 1, url: input, js: ''};
    }),
    limit: 6,
    double: true,
    推荐: '*',
一级: '.module-poster-item.module-item;a&&title;img&&data-original;.module-item-note&&Text;a&&href',
  二级: {
        title: 'h1&&Text',
        img: 'img&&data-original',
        desc: ';.slide-info&&span&&Text;;;',
        content: '#height_limit&&Text',
        tabs: '.module-tab-items-box&&span',
        lists: '.module-play-list&&a',
        //module-play-list-content
        tab_text: 'span&&Text',
        list_text: 'a&&Text',
        list_url: 'a&&href'
    },
            搜索:'.module-card-item.module-item;a&&Text;img&&data-original;.module-item-note&&Text;a&&href',
        }
        